//
//  LGButton.m
//  MindBox
//
//  Created by MS on 16-1-5.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "LGButton.h"
#import "UIView+Frame.h"
@implementation LGButton
{
    UIView * _slipView;
    UIView * _bottomView;
    UIView * _diviView;
}

-(void)setHighlighted:(BOOL)highlighted{};

-(void)setSlipHidden:(BOOL)slipHidden
{
    _slipHidden = slipHidden;
    _slipView.hidden = slipHidden;
}

-(void)setDiviHidden:(BOOL)diviHidden
{
    _diviHidden = diviHidden;
    _diviView.hidden = diviHidden;
}

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        _slipView = [[UIView alloc] init];
        [self addSubview:_slipView];
        _slipView.backgroundColor = [UIColor colorWithRed:0.98f green:0.32f blue:0.31f alpha:1.00f];
        _slipView.hidden = YES;
        
        _bottomView = [[UIView alloc] init];
        [self addSubview:_bottomView];
        _bottomView.backgroundColor = [UIColor colorWithRed:0.86f green:0.86f blue:0.86f alpha:1.00f];
        
        _diviView = [[UIView alloc] init];
        [self addSubview:_diviView];
        _diviView.backgroundColor =[UIColor colorWithRed:0.86f green:0.86f blue:0.86f alpha:1.00f];
        
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _slipView.frame = CGRectMake(0, 0, 1, self.height);
    _bottomView.frame =CGRectMake(0, self.height-1, self.width, 1);
    _diviView.frame = CGRectMake(self.width-1, 0, 1, self.height);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
